package com.basic.technology.study.algorithm;

public class Test1 {
    public static void main(String[] args) {
        System.out.println(test1(2));
    }

    public static int test1(int n){
        int i,j,temp,s;
        s=0;temp=1;

        for(i=1;i<=n;i++){
            temp= temp+1;
            s=s+temp;
        }
        System.out.println(s);
        return s;
    }
}
